import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/home/Home.vue";
import Layout from "../layout/Layout.vue";
import Login from "../views/Login.vue";

Vue.use(VueRouter);

const routes = [
	{
		name: "Layout",
		path: "/",
		redirect: "/home",
		component: Layout,
		children: [
			{
				path: "home",
				name: "Home",
				component: Home,
			},
		],
	},
	{
		name: "Login",
		path: "/login",
		component: Login,
	},
];

const router = new VueRouter({
	mode: "history",
	routes,
});

export default router;
